package com.why.exception;

import com.why.enums.ErrorEnum;

/**
 * @program: why-rpc-framework
 * @description:
 * @author: @why
 * @create: 2021-03-15 21:27
 **/
public class RpcException extends RuntimeException {
    public RpcException(ErrorEnum message, String detail) {
        super(message.getMessage() + ":" + detail);
    }

    public RpcException(String message, Throwable cause) {
        super(message, cause);
    }

    public RpcException(ErrorEnum error) {
        super(error.getMessage());
    }
}
